package wpmp.security.client.utils;

import java.util.List;

import wpmp.security.client.internal.PmpCodeUtils;
import wpmp.utils.quickbean.Code;

/**
 * @author Wayne.Wang<5waynewang@gmail.com>
 * @since 6:53:07 PM Dec 24, 2012
 */
public class CodeUtils {

	public static List<Code> get(String sortType) {
		return PmpCodeUtils.list(sortType);
	}

	public static Code getCode(String sortType, String value) {
		return PmpCodeUtils.get(sortType, value);
	}

	public static String getCodeText(String sortType, String value) {
		final Code code = getCode(sortType, value);
		return code == null ? null : code.getText();
	}
}
